Skip to content

Fix #15237 (CI: run tests using cppcheck solutions docker images for ubuntu) - #9045

Merged
danmar merged 4 commits into
cppcheck-opensource:mainfrom
cppchecksolutions:fix-15237
Nov 20, 2026
Merged

danmar merged 4 commits into
cppcheck-opensource:mainfrom
cppchecksolutions:fix-15237

Conversation

@danmar

@danmar danmar commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Add a CI-buildtools workflow. It runs on the
ghcr.io/cppchecksolutions/buildtools-ubuntu-{22.04,24.04,26.04} images and runs testrunner, the extra tests, test/cli, test/cfg, XML validation, the addons tests and test/tools.

@danmar danmar added the ai-assisted contains code which was written with the assistance of AI - please review extra carefully label Nov 19, 2026
@danmar danmar changed the title Fix #15237 (CI: run tests using cppcheck premium docker images for ubuntu) Fix #15237 (CI: run tests using cppcheck solutions docker images for ubuntu) Nov 19, 2026

@dmcppcheck dmcppcheck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review

I found no functional problems in the new workflow. It matches the steps in CI-unixish.yml, CI-unixish-docker.yml and scriptcheck.yml, and the packages it installs cover what those steps import or run. Three remarks:

  • The 26.04 image is pinned to :v1, but the PR description says :v3, like the other two images. One of them is wrong.
  • The CMakeLists.txt change has nothing to do with this workflow, which builds with make. It only applies on CMake ≥ 4.5, so no CI job here runs it.
  • The workflow doesn't use ccache, unlike the other docker workflows. Each of the three images rebuilds everything from scratch on every PR.

There are no earlier comments to track.

Comments

# Comment By Where Status
1 26.04 image is pinned to :v1 but the PR description says :v3 AI review .github/workflows/cppchecksolutions-build.yml:27 🆕 New
2 No ccache: each of the 3 images does a full rebuild on every run AI review .github/workflows/cppchecksolutions-build.yml:51 🆕 New
3 Unrelated CMake change that no CI job in this PR exercises AI review CMakeLists.txt:7 🆕 New

@danmar, please fix, resolve or reply to the open and new comments: #1, #2, #3.

Testing

  • The PR changes no C++, Python or test sources: diff -rq base pr shows only the new workflow file and CMakeLists.txt. Because of that I didn't build cppcheck/testrunner or write scratch inputs; it would only have tested base code.
  • cmake -S . -B /tmp/b -Werror=dev with the PR's CMakeLists.txt and CMake 3.28.3 configures cleanly (exit 0). The new if(CMAKE_VERSION VERSION_GREATER_EQUAL 4.5) block is skipped there, so I couldn't test the cmake_diagnostic(SET CMD_STRICT IGNORE RECURSE) call itself. No CMake ≥ 4.5 was available.
  • I checked by reading that the dependencies are covered:
    • The Python imports used by test/cli, addons/test, test/tools (htmlreport uses pygments; reduce and donate_cpu need only the stdlib) are covered by the apt packages installed.
    • checkcfg skips its pkg-config- and xmlstarlet-dependent parts when those tools are missing.
    • The strace test in test/cli/other_test.py is covered by the strace package.
    • Using -Werror for test/cli on 22.04 matches what CI-unixish.yml already does on ubuntu-22.04.
  • I couldn't run the workflow itself: there is no network access and none of the ghcr images are available.

Automated review of 870690c by Claude. The pull request was built and tested locally.

Comment thread CMakeLists.txt Resolved
wjakobsson
wjakobsson previously approved these changes Nov 20, 2026
dmcppcheck and others added 4 commits November 20, 2026 11:53
Add a CI-buildtools workflow. It runs on the
ghcr.io/cppchecksolutions/buildtools-ubuntu-{22.04,24.04,26.04}:v3
images and runs testrunner, the extra tests, test/cli, test/cfg,
XML validation, the addons tests and test/tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: William Jakobsson <50847546+wjakobsson@users.noreply.github.com>

@dmcppcheck dmcppcheck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review

I found no new problems. The PR now only adds .github/workflows/cppchecksolutions-build.yml; the earlier CMakeLists.txt change has been dropped. I couldn't run the workflow, so I checked it by reading.

  • The steps match CI-unixish.yml, CI-unixish-docker.yml and scriptcheck.yml.
  • Each test step gets the right PYTHONPATH.
  • The installed packages cover the tools that the steps use (tidy, xmllint, pygments, strace).

One earlier comment is still in the code: the 26.04 image is pinned to :v1 while the description says :v3. That thread is marked resolved, but the line is unchanged.

Comments

# Comment By Where Status
1 26.04 image pinned to :v1 while description says :v3 AI review .github/workflows/cppchecksolutions-build.yml:27 ☑️ Resolved, code unchanged
2 No ccache, each image rebuilds everything on every run AI review .github/workflows/cppchecksolutions-build.yml:51 💬 Answered: Author: object files can't be reused with any other job
3 Unrelated CMakeLists.txt change for CMake >= 4.5 AI review CMakeLists.txt:7 ❔ Code removed
4 Use actions/checkout@v7 @wjakobsson .github/workflows/cppchecksolutions-build.yml:39 ✅ Fixed

Testing

  • I didn't build cppcheck or testrunner and wrote no scratch tests. diff -rq base pr shows that the PR only adds a workflow file, so a build would only have tested the base code.
  • I couldn't run the workflow itself. There is no network access and no ghcr buildtools images, and PyYAML isn't installed in the container, so I couldn't even parse the YAML.
  • What I checked by reading:
    • test/tools/htmlreport/test_htmlreport.py and check.sh are executable. check.sh needs tidy, xmllint and the ./cppcheck that the workflow builds, and all three are there.
    • The Makefile targets validateXML and checkCWEEntries only need xmllint (from libxml2-utils).
    • The PYTHONPATH settings and the -Werror exception for 22.04 match scriptcheck.yml.
  • I couldn't confirm that the buildtools images contain which; the Makefile uses it to find python3 and pcre2-config.

Automated review of 0fc6bec by Claude. The pull request was built and tested locally.

@danmar
danmar merged commit 376ebd7 into cppcheck-opensource:main Nov 20, 2026
74 checks passed
@danmar
danmar deleted the fix-15237 branch November 20, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted contains code which was written with the assistance of AI - please review extra carefully

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants